
<%@page import="BLL.BProduct"%>
<%@page import="DTO.Product"%>
<!-- saved from url=(0038)http://shopmypham.com.vn/vn/trang-chu/ -->
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">





<link href="css/style.css" type="text/css" rel="stylesheet">


<title>Trang chu</title>

</head> 
<body><div id="WzTtDiV" style="visibility: hidden; position: absolute; overflow-x: hidden; overflow-y: hidden; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; left: 0px; top: 0px; width: 0px; "></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
    <tr>
        <td width="50%">&nbsp;</td>
        <td>
            <table>
                
                <tr>
                    <td width="70%"><img src="images/banner.jpg"></td>
                    <td>
                        <!---cho nay la chen login form vo --->
   <%@include file="login_form.jsp" %>
                    </td>
                </tr>
            </table>
        </td>
    </tr>

<tr style="background-image:url(http://shopmypham.com.vn/theme_images/menu/bgtop.gif); background-repeat:repeat-x; background-position:top">
<td width="50%"><img src="images/bgtop.gif"></td>
<td>

<!--
cho nay viet menubar vo nghe
-->

 <%@include file="menu_bar.jsp" %>


</td>	
<td width="50%"><img src="images/bgtop.gif"></td>
</tr>
<!--<tr height="115" style="background-color:#1366ae">
<td width="50%" style="border-bottom:1px solid #FFFFFF">&nbsp;</td>
<td style="background-image:url(http://shopmypham.com.vn/theme_images/center/searchbg.jpg); background-repeat:no-repeat; border-bottom:1px solid #FFFFFF">
<form name="frmSearch" action="http://shopmypham.com.vn/" method="get" enctype="multipart/form-data"><input type="hidden" name="PHPSESSID" value="c7a12ddf8d1b091f0ffa4221ad0ca85e">	                    
<input type="hidden" name="m" value="search">
<!--


Cho ni la thanh tim kiem






</form>	</td>	
<td width="50%" style="border-bottom:1px solid #FFFFFF">&nbsp;</td>
</tr>-->
<tr>
<td width="50%" valign="top" style="background-image:url(http://shopmypham.com.vn/theme_images/bg.jpg); background-repeat:repeat-x; background-position:top"><img src="images/spacer.gif" width="1" height="1"><img src="images/spacer.gif" width="1" height="1"></td>
<td valign="top" style="background-image:url(http://shopmypham.com.vn/theme_images/bg.jpg); background-repeat:repeat-x; background-position:top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td style="padding-bottom:30px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td align="center" style="padding:5px"><a href="http://shopmypham.com.vn/san_pham_hang_115"><img src="images/1009VELVI96_tinhyeu.gif" border="0" title="Tình yêu"></a></td>
<td align="center" style="padding:5px"><a href="http://shopmypham.com.vn/san_pham_hang_116"><img src="images/459VELVPTC_sinhnhat.gif" border="0" title="Sinh nh?t"></a></td>
<td align="center" style="padding:5px"><a href="http://shopmypham.com.vn/san_pham_hang_117"><img src="images/539VELVUGD_teen.gif" border="0" title="Teen"></a></td>
<td align="center" style="padding:5px"><a href="http://shopmypham.com.vn/san_pham_hang_118"><img src="images/219VEM00I5_bantrai.gif" border="0" title="B?n trai"></a></td>
<td align="center" style="padding:5px"><a href="http://shopmypham.com.vn/san_pham_hang_119"><img src="images/369VEM02FS_bangai.gif" border="0" title="B?n gái"></a></td>
<td align="center" style="padding:5px"><a href="http://shopmypham.com.vn/san_pham_hang_120"><img src="images/739VEM04P6_chobeyeu.gif" border="0" title="Cho bé yêu"></a></td>
<td align="center" style="padding:5px"><a href="http://shopmypham.com.vn/san_pham_hang_125"><img src="images/49VEM06BH_thucongmynghe.gif" border="0" title="Th? công m? ngh?"></a></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td class="leftBlock">

<!-- 
	cho nay viet left bar vo
-->
<%@include file="left_bar.jsp" %>



</td>
<td width="100%" valign="top" style="padding-left:10px; padding-right:10px; padding-bottom:10px"><!-- FOOTER --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
    <!--<tr>
<td valign="top" align="center" style="padding-bottom:5px"><img src="images/center.jpg"></td>
</tr>   -->
</tbody></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td valign="top" style="padding-bottom:10px"><script type="text/javascript" src="images/tooltip.js"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody><tr>
<td style=""><img src="images/xemnhieunhat.gif"></td>
</tr>
</tbody></table>
             
  <table style="margin-left: 120px; margin-top: 40px; border: #F59740; border-style: solid; border-width: 2px;">
 	<tr>
 		<td>
                    
                    <table>
 <%
 String categoryId = request.getParameter("categoryId");
 ArrayList<Product> products;
 if(categoryId == null)
         {
     products = new BProduct().getAll();
            
 }
 else
 {
  products= new BProduct().getByCategoryId(Integer.parseInt(categoryId));
   }
   if(products == null)
             {
 %><h3>Khong co san pham duoc tim thay</h3><%
 }
 
   else
             {
     for(int i = 0 ; i<products.size();i+= 3)
                 {
  
   

%>

<!-- day la noi dung cua mot item-->
<tr>
    <%
for(int j = 0 ; j< 3 ; j++)
{       
%>
    
                                                          
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffebeb">
<tbody><tr>
<td style="width:20%; padding:5px; padding-top:10px; padding-bottom:10px" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">		 
<tbody><tr>
<td align="center" valign="top" style="padding:5px;">								
<table border="0" width="150" height="160" cellspacing="0" cellpadding="0" style="border:1px solid #CCCCCC" bgcolor="#FFFFFF">
<tbody><tr>
<td align="center">					<div>
        <a href="product_item.jsp?pId=<%=products.get(i+j).getProductId()%>"><img src="<%=products.get(i+j).getImge()%>" border="0" vspace="5" hspace="5" width="120"></a>
</div>
</td>
</tr>
</tbody></table>
</td>			
<td width="100%" style="padding:5px;" valign="top">
<div><a href="product_item.jsp?pId=<%=products.get(i+j).getProductId()%>" class="title"><%=products.get(i+j).getName()%></a></div>
                              
<div style="color:#FF0000"><strong><%=products.get(i+j).getPrice()%></strong></div>


              
</td>			
</tr>			
</tbody></table>
</td>
</tr>
</tbody>
</table>
</td>

<%}%>
                                                         
                                                            
</tr>
<%
  }
   }                                                     
%>
</table>
                </td>
 	</tr>
 	           
 </table>




</td></tr></tbody></table></td>
</tr>
</tbody></table>	</td>
<td width="50%" valign="top" style="background-image:url(http://shopmypham.com.vn/theme_images/bg.jpg); background-repeat:repeat-x; background-position:top"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>  
<tr height="80">
<td valign="bottom" style="padding:10px; background-color:#232323; color:#232323" colspan="3" align="center">
<font style="color:#FFFFFF">Bkq Group<br>
Hotline: 123456   - Email: bkqvn@gmail.com<br><br>
B?n quy?n website thu?c v? http://bkqvn.com<br><br>
</font><br>

</td>
</tr>
</tbody></table>
</body></html>